using System;
using System.ComponentModel;
using System.Drawing;
using System.Security.Permissions;
using System.Web;
using PickGold.Charting.Utilities;

namespace PickGold.Charting
{
    [SRDescription("DescriptionAttributeHorizontalLineAnnotation_HorizontalLineAnnotation"), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
    public class HorizontalLineAnnotation : LineAnnotation
    {
        internal override void AdjustLineCoordinates(ref PointF point1, ref PointF point2, ref RectangleF selectionRect)
        {
            point2.Y = point1.Y;
            selectionRect.Height = 0f;
            base.AdjustLineCoordinates(ref point1, ref point2, ref selectionRect);
        }

        internal override RectangleF GetContentPosition()
        {
            return new RectangleF(float.NaN, float.NaN, float.NaN, 0f);
        }

        [SerializationVisibility(SerializationVisibility.Hidden), SRDescription("DescriptionAttributeAnnotationType"), Bindable(true), Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRCategory("CategoryAttributeMisc")]
        public override string AnnotationType
        {
            get
            {
                return "HorizontalLine";
            }
        }
    }
}

